package com.example.tang.zhayan;

import android.app.Application;

import com.baidu.mapapi.SDKInitializer;
import com.example.tang.zhayan.db.FileUtils;

import org.xutils.DbManager;
import org.xutils.x;

import cn.sharesdk.framework.ShareSDK;

/**
 * Created by tang on 2015/12/12.
 */
public class BaseApp extends Application {
    private static BaseApp app;
    private static DbManager db;
    @Override
    public void onCreate() {
        super.onCreate();
        app = this;
        x.Ext.init(this);
        x.Ext.setDebug(true);
        SDKInitializer.initialize(this);
        ShareSDK.initSDK(this);
        db = x.getDb(FileUtils.getConfig());
    }

    public  DbManager getDb() {
        return db;
    }

    public static BaseApp getApp() {
        return app;
    }

}
